
#include "KeyID.h"
#include <map>

using namespace std;
namespace yet{
namespace keyid{
	static map<UINT, string> nsmap;
	static map<string, UINT> snmap;
	static UINT cmdID = WM_APP + 10000;


	UINT id(string key){
		UINT n = snmap[key];
		if(n == 0){
			snmap[key] = cmdID;
			nsmap[cmdID] = key;
			n = cmdID;
			++cmdID;
		}
		return n;
	}
	string key(UINT id){
		return nsmap[id];
	}
};
}
